package primetest.dto;

public class Test {
	public static void main(String[] args) {
		String s1 = "Monday";
        String s2 = s1;
        System.out.println(s1 == s2);
	}

	public static boolean isNumber(String s) {
		if (s == null) {
			return false;
		}
		s = s.trim();
		String[] strs = s.split("e");
		if (strs.length > 2) {
			return false;
		}
		String[] strs0 = strs[0].split("\\.");
		if (strs0.length > 2) {
			return false;
		}
		if (!allDigit(strs0[0])) {
			return false;
		}
		if (strs0.length == 2 && !allDigit(strs0[1])) {
			return false;
		}
		if (strs.length == 2) {
			String[] strs1 = strs[1].split(".");
			if (strs0.length >= 2) {
				return false;
			}
			if (!allDigit(strs1[0])) {
				return false;
			}
		}
		return true;
	}

	static boolean allDigit(String str) {
		if (str.length() == 0) {
			return false;
		}
		for (int i = 0; i < str.length(); i++) {
			char ch = str.charAt(i);
			if (!Character.isDigit(ch)) {
				return false;
			}
		}
		return true;
	}
}